from flask import Flask
from flask_migrate import MigrateCommand
from flask_script import Manager
from App import create_app

from App.models.client.client_user_model import User
from App.models.client.client_cities_model import Cities

app = Flask(__name__)

# 配置环境变量五种选择  develop | testing | staging | product | default

# linux 配置环境变量,自动获取环境变量  export FLASK_ENV="develop"
# env = os.environ.get("FLASK_ENV", 'develop')

# window 配置环境变量
env = "develop"

app = create_app(env)

manager = Manager(app=app)
manager.add_command('db', MigrateCommand)

if __name__ == '__main__':
    manager.run()
